OGLX notebook 2

hnxj@github

Load toolboxes

clear;clc;close all;
 
cd('D:\Electrophysiology\Matdelane\');
addpath(genpath('matnwb'));
addpath(genpath('matdelane'));
generateCore();
 
nwbPath = "data\";
 
nwbFiles = {dir(nwbPath).name};
nwbFiles = nwbFiles(endsWith(nwbFiles, ".nwb"));
 
disp("Toolbox setup done.");
Toolbox setup done.
nwbFile = nwbPath + nwbFiles{3};
 
nwb = nwbRead(nwbFile);
disp("Loaded" + nwbFile);
Loadeddata\sub-C31o_ses-230818.nwb
disp("Probe N = " + num2str(length(nwb.general_extracellular_ephys.values())));
Probe N = 3
chrsp1 = jReceptiveFieldMap(nwb, 1);
-> 3 Probes detected in sub-C31o_ses-230818 -->This function will process only probe no.1 (PFC)
chrsp2 = jReceptiveFieldMap(nwb, 2);
-> 3 Probes detected in sub-C31o_ses-230818 -->This function will process only probe no.2 (TEO, FST)
chrsp3 = jReceptiveFieldMap(nwb, 3);
-> 3 Probes detected in sub-C31o_ses-230818 -->This function will process only probe no.3 (MT, MST)
[pinfo, xa] = jNWBSignals(nwb, 0, "flash", 500, 500, "lfp");
>flash: ->Total correct trials: 100 -->Total blocks: 1 -->Total conditions: 1 --->Condition 1 : 100 trials, 100 correct ->Total trials: 100 Area(s): PFC _
data = xa{1};chmp = 1:128;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :), 'DataType', 'raw_cut', 'fsample', 1000, 'intdist', 0.04, 'plot_result', true);
[pinfo, xa] = jNWBSignals(nwb, 1, "flash", 500, 500, "lfp");
>flash: ->Total correct trials: 100 -->Total blocks: 1 -->Total conditions: 1 --->Condition 1 : 100 trials, 100 correct ->Total trials: 100 Area(s): TEO, FST _
data = xa{1};chmp = 1:2:128;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :), 'DataType', 'raw_cut', 'fsample', 1000, 'intdist', 0.04, 'plot_result', true);
[pinfo, xa] = jNWBSignals(nwb, 2, "flash", 500, 500, "lfp");
>flash: ->Total correct trials: 100 -->Total blocks: 1 -->Total conditions: 1 --->Condition 1 : 100 trials, 100 correct ->Total trials: 100 Area(s): MT, MST _
data = xa{1};chmp = 1:64;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :), 'DataType', 'raw_cut', 'fsample', 1000, 'intdist', 0.04, 'plot_result', true);
data = xa{1};chmp = 65:128;
data = permute(data, [2, 3, 1]);
flipObj = vFLIP2(data(chmp, :, :), 'DataType', 'raw_cut', 'fsample', 1000, 'intdist', 0.04, 'plot_result', true);